"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFullURL = void 0;
// @ts-ignore
const buildURL_1 = __importDefault(require("axios/lib/helpers/buildURL"));
function getFullURL(baseURL, url, params, paramsSerializer) {
    if (url.startsWith('http')) {
        return (0, buildURL_1.default)(url, params, paramsSerializer);
    }
    baseURL = baseURL.endsWith('/') ? baseURL : `${baseURL}/`;
    url = url.startsWith('/') ? url.slice(1) : url;
    return (0, buildURL_1.default)(`${baseURL}${url}`, params, paramsSerializer);
}
exports.getFullURL = getFullURL;
